import { commands,window,StatusBarAlignment,EventEmitter,TreeDataProvider } from 'vscode'
import type { ExtensionContext,ThemeIcon } from 'vscode'
import { runUpload } from './upload'
import { registerCommands } from './commands';
import { registerContextCallback } from './contextManager';
import { registerSerialPortView } from './serialPortView';
import { registerLogView } from './logView';
import { registerScriptView } from './scriptView';
import { registerReadOnlyDocument } from './readOnlyDcoument';
import { registerSerialPortTerminalProfile } from './SerialTerminalProfileProvider';

/**
 * @param {vscode.ExtensionContext} context
 */
export async function activate(context: ExtensionContext) {
/*
	console.log('Congratulations, your extension "helloworld-minimal-sample" is now active!');

	let disposable = commands.registerCommand('extension.helloWorld', runUpload);
	
	const myStatusBarItem = window.createStatusBarItem(StatusBarAlignment.Left, 100);
	myStatusBarItem.command = 'extension.helloWorld';
	myStatusBarItem.text = `▷ Run`;
	myStatusBarItem.show();

	context.subscriptions.push(
		disposable,
		myStatusBarItem
	);
*/
	registerCommands(context);
	registerSerialPortView(context);
	registerLogView(context);
	registerScriptView(context);
	registerContextCallback(context);
	registerReadOnlyDocument(context);
	registerSerialPortTerminalProfile(context);

	//context.subscriptions.push(window.registerTreeDataProvider("serialport.serialportView", new serialPortProvider());

}



export function deactivate() { }
    

